/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.urbainski.estagio.entidade;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author Cristian Elder Urbainski
 * @since 11/12/2011
 */
@Entity
@Table(name = "usuario")
public class Usuario implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id_usuario")
    private Integer idUsuario;
    
    @Column(name = "id_professor")
    private Integer idProfessor;

    @Column(name = "cd_login")
    private String cdLogin;
    
    @Column(name = "ds_senha")
    private String dsSenha;
    
    @Column(name = "tp_situacao")
    private Integer tpSituacao;
    
    @Column(name = "tp_usuario")
    private Integer tpUsuario;
    
    @Column(name = "ds_email")
    private String dsEmail;
    
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
    @JoinColumn(name = "id_professor", referencedColumnName = "id_professor", insertable = false, updatable= false)
    private Professor professor;

	public String getDsEmail() {
		return dsEmail;
	}

	public void setDsEmail(String dsEmail) {
		this.dsEmail = dsEmail;
	}
	
    public Integer getTpUsuario() {
		return tpUsuario;
	}

	public void setTpUsuario(Integer tpUsuario) {
		this.tpUsuario = tpUsuario;
	}

	
    public String getCdLogin() {
        return cdLogin;
    }

    public void setCdLogin(String cdLogin) {
        this.cdLogin = cdLogin;
    }

    public String getDsSenha() {
        return dsSenha;
    }

    public void setDsSenha(String dsSenha) {
        this.dsSenha = dsSenha;
    }

    public Integer getIdProfessor() {
        return idProfessor;
    }

    public void setIdProfessor(Integer idProfessor) {
        this.idProfessor = idProfessor;
    }

    public Integer getIdUsuario() {
        return idUsuario;
    }

    public void setIdUsuario(Integer idUsuario) {
        this.idUsuario = idUsuario;
    }

    public Professor getProfessor() {
        return professor;
    }

    public void setProfessor(Professor professor) {
        this.professor = professor;
    }

    public Integer getTpSituacao() {
        return tpSituacao;
    }

    public void setTpSituacao(Integer tpSituacao) {
        this.tpSituacao = tpSituacao;
    }

}
